// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import routers from './base/router'
import VueRouter from 'vue-router'
// import store from './vuex/store'
import Vuex from 'vuex'
// import utilApi from './common/utils'
//  将vue-resource在vue中绑定，自动在vue对象实例上注入一个$http对象就可以使用ajax方法了
import vueResource from 'vue-resource'
// import axios from 'axios'
// import { Message } from 'element-ui'

Vue.config.productionTip = false

// 在Vue中全局使用mintui
Vue.use(ElementUI)
Vue.use(Vuex)
Vue.use(VueRouter)
Vue.use(vueResource)

// let Base64 = require('js-base64').Base64
// let sysConfig = require('@/../config/sysConfig')
// let openAuthenticate = sysConfig.openAuthenticate
// let openAuthorize = sysConfig.openAuthorize

const router = new VueRouter({
  routes: routers
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  // template: '<App/>'
  render: c => c(App)
})
